package com.myprojects.common.pojo;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

public class Position {

    private Integer id;

    @NotBlank(message = "职位名必须为3-20位的任意字符!")
    @Pattern(regexp = "^([^\"]){3,20}$",
            message = "职位名必须为3-20位的任意字符!")
    private String position_name;

    @Pattern(regexp = "^([^\"]){0,50}$",
            message = "简介必须为50位以内的任意字符!")
    private String brief;

    private Integer department_id;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getPosition_name() {
        return position_name;
    }

    public void setPosition_name(String position_name) {
        this.position_name = position_name == null ? null : position_name.trim();
    }

    public String getBrief() {
        return brief;
    }

    public void setBrief(String brief) {
        this.brief = brief == null ? null : brief.trim();
    }

    public Integer getDepartment_id() {
        return department_id;
    }

    public void setDepartment_id(Integer department_id) {
        this.department_id = department_id;
    }

    @Override
    public String toString() {
        return "Position{" +
                "id=" + id +
                ", position_name='" + position_name + '\'' +
                ", brief='" + brief + '\'' +
                ", department_id=" + department_id +
                '}';
    }
}